﻿package 
{
	import flash.display.MovieClip;
	import flash.events.Event;
	
	import util.SoundUtil;
	
	/**
	 * ...
	 * @author gerry
	 */
	public class Mp3Player extends MovieClip 
	{
		private var manager:SoundManager = SoundManager.getInstance();
		private var _util:SoundUtil = null;
		
		public function Mp3Player()
		{
			init();
		}
		
		private function init():void
		{
			this.addEventListener(Event.ENTER_FRAME, onEnterFrame);			
			manager.play('http://www.lingjulihuashi.com/Flash/Music_01.mp3');
		}
		
		private function onEnterFrame(e:Event):void
		{
			if (SoundUtil.soundLoaded)
			{
				loading_mc.info_txt.text = manager.playbackProgress;
				/*if (_util == null)
				{
					_util = new SoundUtil();
					SoundUtil.prototype.info = 'ddddddddd';
				}
				info_txt.text = _util['info'];	*/
			}
			else
			{
				loading_mc.info_txt.text = SoundUtil.info;				
			}
		}

	}
	
}